const koa = require('koa')
const Router = require('koa-router')


const app = new koa()
const router = new Router()

router.get('/api/home', async ctx => {
  ctx.body = {
    name: 'Jimmy',
    age: 20
  }
})

app.use(router.routes())



app.listen(777, () => {
  console.log('server is running on port 777')
})